# 创建项目  scrapy startproject 项目名


# 爬取球鞋相关信息
import requests

url = "https://www.peaksport.com/cn/productsajaxshortcode/%E9%9E%8B/!LFBs"

headers = {
    "ser-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
    "Referer": "https://www.peaksport.com/cn/products/%E9%9E%8B/!LFBs"
}

# zhog
data = {
    "page": "1"
}

resp = requests.post(url, data=data, headers=headers)
# 获取信息
print(resp.text)
# 转换
# import json
# json.dumps() 将JSON转化为字符串
# json.loads() 将JSON类型的字符串转化为JSON

img_list = resp.json()
